# -*- coding: cp936 -*-
import random


b = []
while True:
    count = 0
    a = random.randint(1,8)

    for i in b:
        if a == i:
            count += 1
    if count == 2:
        continue
    else:
        b.append(a)

    if len(b) == 16:
        break
print b
